package com.example.demo.serviceImpl;

import com.example.demo.bean.UserBean;
import com.example.demo.mapper.UserMapper;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author TYM
 */
@Service
public class UserServiceImpl  implements UserService{

    @Resource
    private UserMapper userMapper;

    @Override
    public UserBean loginIn(String name, String password) {
        UserBean bean=new UserBean();
        bean.setName(name);
        bean.setPassword(password);
        return userMapper.getUser(bean);
    }
}
